//
//  DTjavascripteObject.m
//  PersonalManager
//
//  Created by user on 16/8/1.
//  Copyright © 2016年 Haiyun.Qian. All rights reserved.
//

#import "DTjavascripteObject.h"

@implementation DTjavascripteObject

-(NSString *) successResult: (NSString*) result {
    NSDictionary *dic = [[NSDictionary alloc]initWithObjectsAndKeys:@"0", @"errorCode", @"成功", @"errorMessage", result , @"result", nil];
    return (NSString *)dic;
}

-(NSString *) failedResult:(int) code andmessage: (NSString *) message {
    NSString *errorMessage = @"失败";
    code = 1;
    if (message) {
        errorMessage = nil;
    }
    
    NSDictionary *dic = [[NSDictionary alloc]initWithObjectsAndKeys:[NSString stringWithFormat:@"%d", code], @"errorCode", errorMessage, @"errorMessage", nil];
    
    return (NSString *)dic;
}

@end
